﻿/***********************************************************************************************
 * 
 * ProjectName: WMSSoft.Lib.Shell
 * 
 * Description: Provides Members needed for Shell functionality
 * 
 * Created:     11.11.2012
 * 
 * Author:      matthias wagler - matthias@WMSSoft.de
 * 
 * Copyright:   Copyright 2012 by WMSSoft.net
 * 
 * License:     GPLv3
 * 
 * History:     11.11.2012 - matthias wagler matthias@WMSSoft.de    -   Created
 * 
 **********************************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;

namespace WMSSoft.Lib.Shell
{
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    public struct MENUITEMINFO
    {
        public MENUITEMINFO(string text)
        {
            cbSize = ShellAPIConst.cbMenuItemInfo;
            dwTypeData = text;
            cch = text.Length;
            fMask = 0;
            fType = 0;
            fState = 0;
            wID = 0;
            hSubMenu = IntPtr.Zero;
            hbmpChecked = IntPtr.Zero;
            hbmpUnchecked = IntPtr.Zero;
            dwItemData = IntPtr.Zero;
            hbmpItem = IntPtr.Zero;
        }

        public int cbSize;
        public EMIIM fMask;
        public EMFT fType;
        public EMFS fState;
        public uint wID;
        public IntPtr hSubMenu;
        public IntPtr hbmpChecked;
        public IntPtr hbmpUnchecked;
        public IntPtr dwItemData;
        [MarshalAs(UnmanagedType.LPTStr)]
        public string dwTypeData;
        public int cch;
        public IntPtr hbmpItem;
    }
}
